package org.cuit.epoch.seon.example;

import lombok.Setter;

/**
 * @author Seon
 * @version 1.0
 * @since 2024-09-13
 */
public class Originator {

    @Setter
    private String state;

    public void show() {
        System.out.println("state = " + state);
    }

    public Memento createMemento() {
        return new Memento(state);
    }

    public void restoreMemento(Memento memento) {
        this.state = memento.getState();
    }

}
